feat: opposite and same trade side#33
Conversation
Security & Quality Review - Changes Requested🚨 Critical Issues1. Wrong Target BranchThis PR is targeting Action Required: gh pr edit 33 --base dev2. Logic Inversion in Threshold SelectionThe threshold selection logic appears inverted for } else {
// Momentum: Use thresholds based on opposite of liquidation side
thresholdToCheck = liquidation.side === 'BUY'
? (symbolConfig.longVolumeThresholdUSDT ?? symbolConfig.volumeThresholdUSDT ?? 0)
: (symbolConfig.shortVolumeThresholdUSDT ?? symbolConfig.volumeThresholdUSDT ?? 0);
}When
But the code does the opposite. This could cause incorrect threshold applications. 3. Inconsistent ImplementationThe threshold monitor ( const isLongOpportunity = liquidation.side === 'SELL'; // Always contrarian!This doesn't respect the new 4. No Test CoverageZero tests exist for the new functionality. Required test scenarios:
✅ Security Review: PASSED
📝 RecommendationsBefore merge:
Code quality improvements:
🚦 Verdict❌ CHANGES REQUESTED - DO NOT MERGE The feature concept is valuable for supporting different trading strategies, but the implementation needs corrections to ensure it works as intended and doesn't cause unexpected trading behavior. Please address these issues and request re-review when ready. 🤖 Generated with Claude Code |
No description provided.